/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ui.gui.documents;

import bibliothek.gui.dock.common.DefaultSingleCDockable;

/**
 *
 * @author stephane
 */
public class DockableDocument extends DefaultSingleCDockable
{
    private AbstractDocument _document = null;
    private DockableDocument(AbstractDocument document)
    {
        super(document.getFileName(), document.getFileName(), document);;
        
        this._document = document;
      
    }
    public static DockableDocument fromDocument(AbstractDocument document)
    {
        DockableDocument d = new DockableDocument(document);
        document.setParent(d);
        return d;
    }
    
    public AbstractDocument getDocument() {
        return this._document;
        
    }
    
    public void changeTitle(String name) {
    	this.setTitleText(name);
    }
}
